//
//  xingchengCell.m
//  qulvyou
//
//  Created by mmyy on 15/10/20.
//  Copyright (c) 2015年 mmyy. All rights reserved.
//

#import "xingchengCell.h"

@implementation xingchengCell

- (void)awakeFromNib {
    // Initialization code
}

-(instancetype)initWithStyle:(UITableViewCellStyle)style reuseIdentifier:(NSString *)reuseIdentifier
{
    if (self = [super initWithStyle:style reuseIdentifier:reuseIdentifier]) {
        self.backgroundColor = [UIColor clearColor];
        [self createCell];
    }
    return self;
}
-(void)createCell
{
    
    self.bgView = [UIView new];
    self.bgView.backgroundColor = [UIColor whiteColor];
    [self.contentView addSubview:self.bgView];
    self.photo = [[UIImageView alloc] init];
    [self.bgView addSubview:self.photo];
    self.text = [UILabel new];
    self.text.font = [UIFont systemFontOfSize:15];
    self.text.textColor = [UIColor blackColor];
    self.text.adjustsFontSizeToFitWidth = YES;
    [self.bgView addSubview:self.text];
    self.local_time = [UILabel new];
    self.local_time.font = [UIFont systemFontOfSize:12];
    self.local_time.textColor = [UIColor darkGrayColor];
    self.local_time.alpha = 0.6;
    self.local_time.textAlignment = NSTextAlignmentLeft;
    self.local_time.adjustsFontSizeToFitWidth = YES;
    [self.bgView addSubview:self.local_time];
    [self.local_time mas_makeConstraints:^(MASConstraintMaker *make) {
        make.left.equalTo(self.bgView.left).offset(10);
        make.bottom.equalTo(self.bgView.bottom).offset(-10);
        make.height.equalTo(@20);
        make.width.equalTo(@120);
    }];
    self.province = [UILabel new];
    self.province.backgroundColor = [UIColor darkGrayColor];
    self.province.alpha = 0.8;
    self.province.textColor = [UIColor greenColor];
    self.province.layer.cornerRadius = 5;
    self.province.layer.masksToBounds = YES;
    self.province.font = [UIFont systemFontOfSize:12];
    self.province.textAlignment = NSTextAlignmentRight;
    [self.contentView addSubview:self.province];
    [self.province mas_makeConstraints:^(MASConstraintMaker *make) {
        make.bottom.equalTo(self.bgView.bottom).offset(-10);
        make.right.equalTo(self.bgView.right).offset(-5);
        make.width.equalTo(@50);
        make.height.equalTo(@20);
    }];
    
}
- (void)setSelected:(BOOL)selected animated:(BOOL)animated {
    [super setSelected:selected animated:animated];

    // Configure the view for the selected state
}

@end
